module.exports = {
  productionSourceMap: false,
  filenameHashing: false, // 生成静态资源时，是否包含hash值
  publicPath: Object.is(process.env.NODE_ENV, 'production') ? '/web-designer/' : '/',
  chainWebpack: config => {
    config.module
      .rule('images')
      .use('url-loader')
      .loader('url-loader')
      .tap(options => Object.assign(options, { limit: 1024 }))
  },
  devServer: {
    proxy: {
      '/api': {
        target: 'http://127.0.0.1:8082',
        changeOrigin: true,
        pathRewrite: {
          '^/api': ''
        }
      }
    }
  }
}